function queryApply_applyManager(page) {
	sys_loading();
	var parm = $('#queryApplyForm').serialize() + (page != null ? ('&page=' + page) : '');
	var url = create_url('applyManager-query');
	sys_record_parm('applyManager',parm);
	$.ajax({type:'POST', url:url, data:parm,
		success: function(result) {
			sys_loading_close();
			$('#applyManagerList').html(result);
		}
	});
}



function showApplyInfoDetail_applyManager(code) {
	var parm = {'code':code};
	var url = create_url('applyManager-detail');
	$.colorbox({overlayClose:false, href:url, data:parm, close:'[关闭]', width:'600px', height: '600px', open:true});
}


//点击查看完以后,修改确认状态
function updateDesignate1_applyManager(code) {
	var parm = {'code':code};
	var url = create_url('applyManager-updateDesignate1');
	$.ajax({type:'POST',url:url, data:parm,
		success:function (result) {
			sys_submiting_close();
			if (result == 'success') {
				sys_msg('操作成功!');
				sys_load_handle('applyManager');
			} else if (result == 'exists') {
				sys_msg('对不起！你已经审核过了！');
			} else if (result == 'error') {
				sys_msg('对不起! 你没有权限');
			} else if (result == 'parameter_error') {
				sys_msg('对不起! 上级还未审核');
			} else {
				sys_msg('操作失败!');
			}
		}
	});
}

function check_applyManager() {
	var remark = $('#remark').val();
	if (remark == null || remark == ''){
		$('#remark').css('border-color','red');
	}
}

//点击查看完以后,修改确认状态
function updateDesignate2_applyManager(code) {
	var remark = $('#remark').val();
	if (remark == null || remark == ''){
		sys_msg('亲，要说明驳回原因的哦！');
		return false;
	}
	var parm =  {'code':code, 'remark': remark};
	var url = create_url('applyManager-updateDesignate2');
	$.ajax({type:'POST',url:url, data:parm,
		success:function (result) {
				sys_submiting_close();
			if (result == 'success') {
				sys_msg('操作成功!');
				sys_load_handle('applyManager');
			} else if (result == 'exists') {
				sys_msg('对不起！已经审核过了！');
			} else if (result == 'error') {
				sys_msg('对不起! 你没有权限');
			} else if (result == 'parameter_error') {
				sys_msg('对不起! 上级还未审核');
			} else {
				sys_msg('操作失败!');
			}
		}
	});
}